import request from "@/utils/request.js";
import axios from "axios";
export const Search = async (name) => {
    return await request.get(
        `/commodity?name=${name}`,
    )
}
export const all = async () => {
    return await request.get(
        `/commodity`,
    )
}
export const Cartinsert = async (data) => {
    return await request.post(
        `/cart/insert`,
        data
    )
}
export const GetCart = async()=>{
    return await request.get('/cart')
}
export const Delete = async (id) => {
    return await request.delete(
        `/cart/delete/${id}`,
    )
}